<?php /* SVN: $Id: view.ctp 2878 2010-08-27 11:07:18Z sakthivel_135at10 $ */ ?>
<div class="container_24">
  <div class="l-curve-top">
    <div class="r-curve-top">
      <div class="top-bg"></div>
    </div>
  </div>
  <div class="shad-bg-lft clearfix">
    <div class="shad-bg-rgt">
      <div class="shad-bg shad-bg1">
        <div class="banner-view-content clearfix banner">
            <div class="grid_18 omega">
              <div class="clearfix">
                <div class="title-img grid_left">
				
				
				 <?php echo $this->Html->showImage('Project',$project['Attachment'],array('dimension' => 'small_thumb', 'alt' => sprintf('[Image: %s]', $this->Html->cText($project['Project']['name'], false)), 'class' => 'project-view-image', 'title' => $this->Html->cText($project['Project']['name'], false))); ?></div>
                <h2 class="project-title grid_left grid_16 alphs omega"><?php echo $this->Html->filterSuspiciousWords($this->Html->cText($project['Project']['name'], false), $project['Project']['detected_suspicious_words']);?></h2>
              </div>
              <p class="project-author content-space-left">
                <?php echo __l('A '); ?><?php echo $this->Html->link($project['ProjectCategory']['name'], array('controller' => 'projects', 'action' => 'index', 'category' => $project['ProjectCategory']['slug']), array('title' => $project['ProjectCategory']['name']));?></li>
                <?php echo __l(' Project in '); ?><?php echo !empty($project['City']['name']) ? $project['City']['name'].',':''.!empty($project['Country']['name']) ? $project['Country']['name'] : '';?><?php echo __l(' by '); ?><?php echo $this->Html->link($this->Html->cText($project['User']['username']), array('controller' => 'users', 'action' => 'view', $project['User']['username']), array('escape' => false));?>
                    <?php if ($project['User']['id'] !=  $this->Auth->user('id')) { ?>
                             <?php
                			  if($this->Auth->user('id'))
                				echo $this->Html->link(__l('Send message'), array('controller' => 'messages', 'action' => 'compose', 'user' => $project['User']['username'],'project_id'=>$project['Project']['id']), array('class' => 'js-colorbox cboxelement msg msg1 msg2', 'escape' => false,'title'=>__l('send message')));
                			  else
                				echo $this->Html->link(__l('Send message'), array('controller' => 'users', 'action' => 'login/?f='.$this->request->url), array('escape' => false, 'class' => '','title'=>__l('send message')));
            			     ?>
                    <?php } ?>
              </p>
            </div>
            <?php  if (Configure::read('Project.is_project_follower_enabled')): ?>
            <div class="follow-pledge follow-pledge1 grid_right clearfix">
                <?php if ($this->Auth->sessionValid()): ?>
                <?php if($project['Project']['user_id'] != $this->Auth->user('id')): ?>
                <div class="js-followers-response grid_left">
             <p class="follow grid_left">
                <?php
									if (!empty($follower)):
										echo $this->Html->link(__l('Unfollow'), array('controller' => 'project_followers', 'action' => 'delete', $follower['ProjectFollower']['id']),array('class'=>"remove_follower js-add-remove-followers",'title'=>__l('Unfollow')));
									else:
									     if($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached || $project['Project']['project_status_id'] == ConstProjectStatus::FundingClosed):
										     echo $this->Html->link(__l('Follow'), array('controller' => 'project_followers', 'action' => 'add', $project['Project']['id']),array('class' => "js-add-remove-followers", 'title'=>__l('Follow')));
                                         endif;
									endif;
								?>

            </p>
         </div>
                <?php endif; ?>
                <?php else: ?>
             <p class="follow grid_left">

                <?php
								if ($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached || $project['Project']['project_status_id'] == ConstProjectStatus::FundingClosed):
									echo $this->Html->link(__l('Follow'), array('controller' => 'users', 'action' => 'login', '?' => 'f=project/' . $project['Project']['slug'], 'admin' => false), array('class' => '', 'title' => __l('Follow')));
								endif;
							?>
							</p>

                <?php endif; ?>
					
			   <?php if(($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached) && !$project['Project']['admin_suspend']):?>
              <p class="follow grid_left">
              <?PHP if(($project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached) || ($project['Project']['project_status_id'] == ConstProjectStatus::GoalReached)){
                $link = "Fund";
                }
                else
                {
                 $link = "Pledge";
                }
              ?>
			<?php echo $this->Html->link(__l($link), array('controller' => 'project_funds', 'action' => 'add', $project['Project']['id']), array('title' => $link,'escape' => false)); ?>
              </p>
			  <?php endif; ?>
            </div>
            <?php endif; ?>

        </div>
        <div class="main-view  clearfix">
          <div id="side1" class="grid_14 alpha omega">
            <div class="js-tabs clearfix banner-tabs-content ui-tabs">
              <ul class="clearfix banner-tabs ui-tabs-nav">
                <li><em></em><?php echo $this->Html->link(__l('About the Project'), '#project-details',array('title'=>__l('About the Project'),'rel' => 'address:/project_details')); ?></li>
                <li><em></em>
                  <?php
							if(!empty($project['Project']['feed_url']) && Configure::read('Project.is_enable_rss_feed')):
								echo $this->Html->link('<em class="tab-txt">'.__l('Updates').'</em>'.'<span>'.$this->Html->cInt($project['Project']['project_feed_count'], false).'</span>', array('controller'=>'project_feeds','action'=>'index',$project['Project']['id']),array('title' =>  __l(' Updates'), 'rel' => 'address:/updates','escape' => false));
						?>
                  <?php
							else:
								echo $this->Html->link('<em class="tab-txt">'.__l('Updates').'</em>'.'<span>'.$this->Html->cInt($project['Project']['blog_count'], false).'</span>', array('controller'=>'blogs','action'=>'index','project_id' => $project['Project']['id']),array('title' =>  __l(' Updates'), 'rel' => 'address:/updates','escape' => false));
						?>
                  <?php
							endif;
						?>
                </li>
                <?php if ( (Configure::read('Project.is_enable_facebook_url') && !empty($project['Project']['facebook_feed_url'])) || ( Configure::read('Project.is_enable_twitter_url') && !empty($project['Project']['twitter_feed_url']) )): ?>
                <li class="social-feeds"><em></em>
                <?php echo $this->Html->link('<span class="feeds-icon">'.__l('Stream').'</span>', '#social_feeds', array('title' =>  __l('Stream'), 'rel' => 'address:/social_feeds', 'escape' => false)); ?></li>
                <?php endif; ?>
                <?php //if (Configure::read('Project.is_enable_idea') && $backer):
					if (Configure::read('Project.is_enable_idea')):
					?>
                <li><em></em><?php echo $this->Html->link('<em class="tab-txt">'.__l('Voters').'</em>'.'<span class="js-view_page_rating_count">'.$this->Html->cInt($project['Project']['project_rating_count'], false).'</span>' , array('controller' => 'project_ratings', 'action' => 'index', 'project_id' => $project['Project']['id']), array('title' =>  __l(' Votings'), 'rel' => 'address:/ratings','escape' => false)); ?></li>
                <?php endif;?>
                <?php if($project['Project']['project_status_id'] != ConstProjectStatus::OpenForIdea):?>
                <?php if($project['Project']['user_id'] == $this->Auth->user('id') || (Configure::read('Project.is_show_backers_list_for_guest_users')) || $backer) :?>
                <li><em></em><?php echo $this->Html->link('<em class="tab-txt">'.__l('Backers').'</em>'.'<span>'.$this->Html->cInt($backer, false).'</span>', array('controller' => 'project_funds', 'action' => 'index', 'project_id' => $project['Project']['id']), array('title' =>  __l(' Backers'), 'rel' => 'address:/backers','escape' => false)); ?></li>
                <?php endif;?>
                <?php endif;?>
                <?php if(Configure::read('Project.is_project_comment_enabled')): ?>
                <?php  if(Configure::read('Project.is_fb_project_comment_enabled')): ?>
                <li><em></em><?php echo $this->Html->link('<em class="tab-txt">'.__l(' Comments').'</em>'.'<span>'.$this->Html->cInt($project['Project']['project_comment_count'], false).'</span>', '#project_comments', array('title' =>  __l(' Comments'), 'rel' => 'address:/comments','escape' => false)); ?></li>
                <?php else: ?>
                <li><em></em><?php echo $this->Html->link('<em class="tab-txt">'.__l('Comments').'</em>'.'<span>'.$this->Html->cInt($project['Project']['project_comment_count'], false).'</span>', array('controller' => 'project_comments', 'action' => 'index', $project['Project']['id']), array('title' =>  __l(' Comments'), 'rel' => 'address:/comments','escape' => false)); ?></li>
                <?php endif; ?>
                <?php endif;?>
                <?php  if (Configure::read('Project.is_project_follower_enabled') && $project['Project']['project_status_id'] != ConstProjectStatus::OpenForIdea ): ?>
                <li><em></em><?php echo $this->Html->link('<em class="tab-txt">'.__l('Followers').'</em>'.'<span>'.$this->Html->cInt($project['Project']['project_follower_count'], false).'</span>', array('controller' => 'project_followers', 'action' => 'index', $project['Project']['id']), array('title' =>  __l(' Followers'), 'rel' => 'address:/followers','escape' => false)); ?></li>
                <?php endif; ?>
              </ul>
              <div id="project-details" class="tabs-view-content">
                <?php if (!empty($project['Project']['video_embed_url'])): ?>
                <div class="clearfix video-block">
				           <?php
								if ($this->Embed->parseUrl($project['Project']['video_embed_url'])) {
                                   $this->Embed->setObjectAttrib('wmode','transparent');
                                   $this->Embed->setObjectParam('wmode', 'transparent');
									echo $this->Embed->getEmbedCode();
								}
							?>

                </div>
                <?php endif; ?>
                <?php echo $this->Html->showImage('Project',$project['Attachment'],array('dimension' => 'very_big_thumb', 'alt' => sprintf('[Image: %s]', $this->Html->cText($project['Project']['name'], false)), 'class' => 'project-view-image', 'title' => $this->Html->cText($project['Project']['name'], false))); ?>
				<?php if(!empty($project['ProjectMedia'])){ ?>
                <p><a class="more" href="#More-media-files-associated-with-this-project" title="More media files associated with this project">More media files associated with this project  &raquo;</a></p> <?php } ?>
                <div class="clearfix share-block">
                  <div class="l-curve-top">
                    <div class="r-curve-top">
                      <div class="top-bg"></div>
                    </div>
                  </div>
                  <div class="shad-bg2">
                    <div class="clearfix">
                      <p class="share grid_left"><?php echo __l('Share this project with your friends'); ?></p>
                      <?php if(Configure::read('Project.is_project_flag_enabled')): ?>
                      <div class="abuse grid_right">
                        <?php
												if ($this->Auth->sessionValid()):
													if($project['Project']['user_id'] != $this->Auth->user('id')) :
														echo $this->Html->link(__l('Report Project'), array('controller' => 'project_flags', 'action' => 'add', $project['Project']['id']), array('title' => __l('Report Project'), 'class' => 'js-thickbox report'));
													endif;
												else :
													echo $this->Html->link(__l('Report Project'), array('controller' => 'users', 'action' => 'login', '?' => 'f=project/' . $project['Project']['slug'], 'admin' => false), array( 'title' => __l('Report project'), 'class' => 'report'));
												 endif;
											?>
                      </div>
                      <?php endif; ?>
                    </div>
                    <ul class="list share-info clearfix">
                      <?php $share_url = Router::url(array('controller' => 'projects', 'action' => 'view', $project['Project']['slug']), true); ?>
                      <li><?php echo $this->Html->link(__l('Embed'), '#embed_frame', array('escape' => false, 'class'=>'embed js-embed-view', 'title'=>__l('Embed code')));?></li>
                      <li class="mail"><?php echo $this->Html->link(__l('Email!'), 'mailto:?body='.__l('Check out the great project on ').Configure::read('site.name').' - '.$share_url.'&amp;subject='.__l('Your friend has recommended that you check out').' '.$this->Html->cText($project['Project']['name'], false).__l(', a').' '.Configure::read('site.name').' '.__l('project by').' '.$project['User']['username'], array('target' => 'blank', 'title' => __l('Send a mail to friend about this project'), 'class' => 'quick icon-list'));?></li>
                      <li>
                        <div class="addthis_toolbox addthis_default_style"> <a class="addthis_button_compact" href="http://www.addthis.com/bookmark.php?v=250&amp;username=xa-4be1665734d1eaab"><?php echo __l('Share'); ?></a>
                          <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4be1665734d1eaab"></script>
                        </div>
                      </li>
                      <li class="twit">
                        <script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
                        <a href="http://twitter.com/share?url=<?php echo $share_url; ?>&amp;text=<?php echo $this->Html->cText($project['Project']['name'], false);?>&amp;lang=en&amp;via=<?php echo Configure::read('site.name'); ?>&amp;count=none" class="twitter-share-button" target="_blank"><?php echo __l('Tweet!');?></a></li>
                      <li class="fb-share-block">
                        <fb:like href="<?php echo $share_url; ?>" layout="button_count" font="tahoma"></fb:like>
                      </li>
                    </ul>
                    <div class="hide">
                      <div id="embed_frame">
                        <?php
                           if (Configure::read('Project.is_enable_idea')):
									$height = '520';
								else:
									$height = '480';
								endif;
								$embed_url = Router::url(array('controller' => 'projects', 'action' => 'view', $project['Project']['slug'],	'widget') , true);
								$embed_code = '<iframe src="'.$embed_url.'" width="240" height="480" frameborder = "0" scrolling="no"></iframe>';
								echo $this->Form->input('embed_url', array('class' =>'clipboard js-highlight-text', 'readonly'=>'readonly','type' => 'textarea', 'label' => __l('Embed Code: '), 'value' =>$embed_code, 'readonly' => true));
							?>
                      </div>
                    </div>
                    <div class="clearfix">
                      <p class="grid_5">
                        <?php
												echo $this->Html->link($this->Html->cText($project['ProjectCategory']['name'], false), array('controller' => 'projects', 'action' => 'index', 'category'=>$project['ProjectCategory']['slug']), array('escape' => false, 'class' => 'category-tag', 'title' => $this->Html->cText($project['ProjectCategory']['name'], false)));
											?>
                      </p>
                      <address class="grid_right">
                      <?php
												$location = array();
												$place = '';
												if (!empty($project['City'])) :
													$location[] = $project['City']['name'];
												endif;
												if (!empty($project['Country']['name'])) :
													$location[] = $project['Country']['name'];
												endif;
												$place = implode(', ', $location);
												if ($place):
													if (!empty($project['Country']['iso2'])):
											?>
                      <span class="flags flag-<?php echo strtolower($project['Country']['iso2']); ?>" title ="<?php echo $project['Country']['name']; ?>"><?php echo $project['Country']['name']; ?></span>
                      <?php
													endif;
													echo $this->Html->link($place, array('controller' => 'projects', 'action' => 'index', 'city'=>$project['City']['slug']), array('escape' => false));
												endif;
											?>
                      </address>
                    </div>
                    <?php if(!empty($project['Project']['website_url']) || !empty($project['Project']['linkedin_url']) || !empty($project['Project']['facebook_url']) || !empty($project['Project']['twitter_url']) || !empty($project['Project']['youtube_url']) || !empty($project['Project']['myspace_url']) || !empty($project['Project']['imdb_url']) ): ?>
                    <div class="other-websites-block clearfix">
                      <h4 class="grid_13"><?php echo __l('This project in other websites'); ?></h4>
                      <ul class="clearfix grid_13 list">
                        <?php if(!empty($project['Project']['website_url'])):?>
                        <li><em></em><a href="<?php echo $this->Html->cText($project['Project']['website_url'], false);?>" title="<?php echo $this->Html->cText($project['Project']['website_url'], false);  ?>"  class="website" target="_blank"><?php echo __l('Homepage'); ?></a></li>
                        <?php endif;?>
                        <?php if(!empty($project['Project']['linkedin_url'])):?>
                        <li><em></em><a href="<?php echo $this->Html->cText($project['Project']['linkedin_url'], false);?>" title="<?php echo $this->Html->cText($project['Project']['linkedin_url'], false); ?>" class="linkedin" target="_blank"><?php echo __l('LinkedIn');?></a></li>
                        <?php endif;?>
                        <?php if(!empty($project['Project']['facebook_url'])):?>
                        <li><em></em><a href="<?php echo $this->Html->cText($project['Project']['facebook_url'], false);?>" class="facebook" title="<?php echo $this->Html->cText($project['Project']['facebook_url'], false); ?>" target="_blank"><?php echo __l('Facebook');?></a></li>
                        <?php endif;?>
                        <?php if(!empty($project['Project']['twitter_url'])):?>
                        <li><em></em><a href="<?php echo $this->Html->cText($project['Project']['twitter_url'], false);?>" title="<?php echo $this->Html->cText($project['Project']['twitter_url'], false); ?>" class="twitter"  target="_blank" rel="me nofollow"><?php echo __l('Twitter'); ?></a></li>
                        <?php endif;?>
                        <?php if(!empty($project['Project']['youtube_url'])):?>
                        <li><em></em><a href="<?php echo $this->Html->cText($project['Project']['youtube_url'], false);?>" title="<?php echo $this->Html->cText($project['Project']['youtube_url'], false); ?>" class="youtube" target="_blank"><?php echo __l('YouTube'); ?></a></li>
                        <?php endif;?>
                        <?php if(!empty($project['Project']['myspace_url'])):?>
                        <li><em></em><a href="<?php echo $this->Html->cText($project['Project']['myspace_url'], false);?>" title="<?php echo $this->Html->cText($project['Project']['myspace_url'], false); ?>" class="myspace"  target="_blank"><?php echo __l('MySpace'); ?></a></li>
                        <?php endif;?>
                        <?php if(!empty($project['Project']['imdb_url'])):?>
                        <li><em></em><a href="<?php echo $this->Html->cText($project['Project']['imdb_url'], false);?>" title="<?php echo $this->Html->cText($project['Project']['imdb_url'], false); ?>" target="_blank" class="imdb" ><?php echo __l('IMDb'); ?></a></li>
                        <?php endif;?>
                      </ul>
                    </div>
                    <?php endif;?>
                  </div>
                  <div class="share-bl">
                    <div class="share-br">
                      <div class="share-bm"></div>
                    </div>
                  </div>
                </div>
                <?php if(!empty($project['Project']['linkedin_url']) || !empty($project['Project']['facebook_url']) || !empty($project['Project']['twitter_url']) || !empty($project['Project']['youtube_url']) || !empty($project['Project']['myspace_url']) || !empty($project['Project']['website_url']) || !empty($project['Project']['imdb_url'])):?>
                <?php endif; ?>
                <?php if(!empty($project['Project']['description'])): ?>
                <h3 class="about"> <?php echo __l('About Project'); ?></h3>
                <?php echo $this->Html->filterSuspiciousWords($this->Html->cHtml($project['Project']['description']), $project['Project']['detected_suspicious_words']);?>
                <?php endif; ?>
                <div class="media-block">
                <h3 class="about"><a id="More-media-files-associated-with-this-project" name="More-media-files-associated-with-this-project" href="#" title="More media files associated with this project"><?php echo __l('Media and other files'); ?></a></h3>
				<ul class="media-list">
				<?php if(!empty($project['ProjectMedia'])):?>
				<?php $file_type = array('doc' => 'msword', 'xls' => 'vnd.ms-excel', 'pdf' => 'pdf', 'video' => 'octet-stream');?>
                <?php foreach($project['ProjectMedia'] as $media):
        			  $mime_type = split('/',$media['mimetype']);
					  if($mime_type[0] == 'application'){
						  $span_class = array_search($mime_type[1], $file_type);
					  }
					  else{
					  $video_file_type = array('mp4' => 'mp4', 'wmv' => 'x-ms-wmv', 'mp3' => 'mp3', 'mpg' => 'mpg', 'MPG' => 'MPG', 'flv' => 'flv');
					  if(in_array($mime_type[1],$video_file_type)){
						  $span_class = 'video';
					  }
					  else{
        			  $span_class = $mime_type[1];
					  }
					  }
					  
				?>
                  <li class="clearfix">
				   <div class="grid_1 grid_left">
                     <?php echo $this->Html->link(isset($span_class)?$this->Html->image($span_class.".png"):'', array('controller' => 'projects', 'action' => 'mediadownload', $project['Project']['slug'], $media['id']), array('title' => __l('Download') ,'escape' => false)); ?></div>
                    <div class="media-right grid_right">
                    <?php
                       echo $this->Html->link($media['description'], array('controller' => 'projects', 'action' => 'mediadownload', $project['Project']['slug'], $media['id']), array('title' => __l('Download') ,'escape' => false));
                    ?>
                    </div>
                  </li>
				  <?php endforeach; ?>
				<?php else: ?>
				<li><p class="notice"><?php echo __l('No media files available');?></p></li>
				<?php endif; ?>
				</ul>
                </div>
              </div>
              <?php  if(Configure::read('Project.is_fb_project_comment_enabled')): ?>
				<div id="project_comments">
					<div class="l-curve-top">
						<div class="top-bg"></div>
						<div class="r-curve-top"></div>
					</div>
					<div class="shad-bg-lft">
						<div class="shad-bg-rgt">
							<div class="shad-bg">
								<div class="main-section">
									<h2><?php echo __l('Comments');?></h2>
									<?php
									$comment_code = Configure::read('Project.comment_code');
									 echo strtr($comment_code,array(
											'##APPID##' => Configure::read('facebook.fb_user_id'),
											'##URL##' =>Router::url(array('controller' => 'projects', 'action' => 'view', $project['Project']['slug']), true),
										));

								 ?>
								</div>
							</div>
						</div>
					</div>
					<div class="l-curve-bot">
						<div class="bot-bg"></div>
						<div class="r-curve-bot"></div>
					</div>
				</div>
			<?php endif; ?>
              <?php if ((Configure::read('Project.is_enable_facebook_url') && !empty($project['Project']['facebook_feed_url'])) || (Configure::read('Project.is_enable_twitter_url') && !empty($project['Project']['twitter_feed_url']))): ?>
              <div id="social_feeds">
                     <h2><?php echo __l('Stream');?></h2>
                        <?php if (Configure::read('Project.is_enable_facebook_url') && !empty($project['Project']['facebook_feed_url'])): ?>
                        <div class="facebook-block grid_6 clearfix">
                          <fb:activity site="<?php echo $project['Project']['facebook_feed_url'] ?>" width="225" height="300" header="false" recommendations="false"></fb:activity>
                        </div>
                        <?php endif; ?>
                        <?php if(Configure::read('Project.is_enable_twitter_url') && !empty($project['Project']['twitter_feed_url'])): ?>
                        <div class="grid_6">
                          <?php $feed_username = $project['Project']['twitter_feed_url']; ?>
                          <script src="http://widgets.twimg.com/j/2/widget.js" type="text/javascript"></script>
                          <script type="text/javascript">new TWTR.Widget({version: 2, type: 'profile', rpp: 5, interval: 30000, width: 250, height: 300, theme: {shell: {background: '#8ec1da', color: '#ffffff'}, tweets: {background: '#ffffff', color: '#444444', links: '#1985b5'}}, features: {scrollbar: false, loop: false, live: false, hashtags: true, timestamp: true, avatars: false, behavior: 'all'}}).render().setUser('<?php echo $feed_username; ?>').start();</script>
                        </div>
                        <?php endif; ?>
              </div>
              <?php endif; ?>
            </div>
          </div>
          <div id="side2" class="clearfix grid_9 grid_right omega alpha">
		    <div class="side2-inner clearfix">
              <div class="side2-top-lft">
                <div class="side2-top-rgt">
                  <div class="side2-top"></div>
                </div>
              </div>
              <div class="side2-left">
                <div class="side2-right">
                  <div class="side2-center clearfix">
                    <div class="idea-view-counts clearfix">
                    <div class="fund-details clearfix">
                      <?php
						if(!$project['Project']['admin_suspend']):
							if($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached):
					?>
                      <?php if ($project['Project']['needed_amount'] != 0): ?>
                      <?php if ($project['Project']['collected_amount'] >= $project['Project']['needed_amount'] && !empty($project['Project']['is_allow_over_funding'])): ?>
                      <p><?php echo __l('Goal Reached, but it allows for over funding and this project will be closed on') . ' ' . strftime('%A %b %d, %I:%M %p', strtotime($project['Project']['project_funding_end_date'])) . ' ' . date('T'); ?></p>
                      <?php elseif ($project['Project']['collected_amount'] == $project['Project']['needed_amount']): ?>
                      <p><?php echo __l('Goal Reached'); ?></p>
                      <?php else: ?>
                      <p><?php echo __l('This project will only be funded if at least ') . Configure::read('site.currency') . $this->Html->cCurrency($project['Project']['reserve_amount']) . __l(' is pledged by ') . strftime('%A %b %d, %I:%M %p', strtotime($project['Project']['project_funding_end_date'])) . ' ' . date('T'); ?></p>
                      <?php endif; ?>
                      <?php endif; ?>
                      <?php elseif($project['Project']['project_status_id'] == ConstProjectStatus::FundingClosed):?>
                      <p><?php echo __l('Funding Successful');?></p>
                      <?php elseif($project['Project']['project_status_id'] == ConstProjectStatus::FundingExpired):?>
                      <p><?php echo __l('Funding Expired');?></p>
                      <?php elseif($project['Project']['project_status_id'] == ConstProjectStatus::Pending):?>
                      <p><?php echo __l('Pending Status');?></p>
                      <?php elseif($project['Project']['project_status_id'] == ConstProjectStatus::OpenForIdea):?>
                      <p><?php echo __l('Open for voting');?></p>
                      <?php elseif($project['Project']['project_status_id'] == ConstProjectStatus::ProjectCancelled):?>
                      <p><?php echo __l('Cancelled');?></p>
                      <?php endif; ?>
                      <?php else:?>
                      <p><?php echo __l('Admin suspended');?></p>
                      <?php endif; ?>
                    </div>
                      <?php if ($project['Project']['project_status_id'] != ConstProjectStatus::OpenForIdea ): ?>
                      <dl class="project-details">
                        <dt><?php echo __l('BACKERS'); ?></dt>
                        <dd><?php echo $this->Html->cInt($backer);?></dd>
                      </dl>
                    <div class="clearfix graph-block">
                    <div class="grid_2">
                        <?php
                        /* Chart block */
						$collected_percentage = ($project['Project']['collected_percentage']) ? $project['Project']['collected_percentage'] : 0;
						$needed__percentage = 0;
						if($collected_percentage < 100){
							$needed__percentage = 100-$collected_percentage;
						}
                        echo $this->Html->image('http://chart.googleapis.com/chart?cht=p&amp;chd=t:'.$collected_percentage.','.$needed__percentage.'&amp;chs=70x70&amp;chco=00AFEF|C1C1BA&amp;chf=bg,s,FF000000', array('title' => __l('Collected: ').$collected_percentage.'%'));
                        /* Chart block ends*/
                        ?>
                    </div>
                      <dl class="project-details project-details1">
                        <dt><?php echo __l('Funding amount') . ' ' . Configure::read('site.currency') . $this->Html->cCurrency($project['Project']['needed_amount']);?></dt>
                        <dd><?php echo Configure::read('site.currency') . $this->Html->cCurrency($project['Project']['collected_amount']);?></dd>
                      </dl>
                      </div>
                      <?php if($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached || $project['Project']['project_status_id'] == ConstProjectStatus::FundingClosed || $project['Project']['project_status_id'] == ConstProjectStatus::Pending): ?>
                      <?php if($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached):?>
                      <?php  $end_time = intval(strtotime($project['Project']['project_funding_end_date']) - time()); ?>
                      <dl class="project-details clearfix">
                        <dt><?php echo (round($project[0]['enddate']) >0)?__l('Days to go'):__l('Hours to go'); ?></dt>
                        <dd>
                          <?php
											if(round($project[0]['enddate']) > 0):
												echo $this->Html->cInt($project[0]['enddate']);
											else:
										?>
                          <div class="time-count">
                            <div class="js-countdown">&nbsp;</div>
                            <span class="js-time hide"><?php echo $end_time;?> </span> </div>
                          <?php
											endif;
										?>
                        </dd>
                      </dl>
                      <?php endif;?>
                      <?php endif;?>
                      <?php endif;?>

                    </div>
                     <?php if (Configure::read('Project.is_enable_idea')) :?>
                      
                   
				<div class="vote-tl"><div class="vote-tr"><div class="vote-top"></div></div></div>


					<div class="vote-content">

                    <div class="votes-l"><div class="votes-r">
					<div class="votes-mid"><span class="js-idea-vote-count-<?php echo $project['Project']['id']; ?> vote-count-value"><?php echo $this->Html->cInt($project['Project']['total_ratings']); ?></span> <?php echo __l('votes'); ?></div></div></div>


					 <div class="clearfix">
                        <dl class="idea-details grid_left">
                          <dt><?php echo __l('Voters'); ?></dt>
                          <dd><span class="js-idea-voters-count"><?php echo $this->Html->cInt($project['Project']['project_rating_count']);?></span></dd>
                        </dl>
                        <dl class="idea-details grid_right">
                          <dt><?php echo __l('Average votes'); ?></dt>
                          <dd><span class="js-idea-rating-count"><?php
                                 if($project['Project']['project_rating_count']!=0)
								 {
                                 	$average_rating = $project['Project']['total_ratings']/$project['Project']['project_rating_count'];
								 	echo $this->Html->cFloat($average_rating);
								 }
								 else
								 {
								 	echo $this->Html->cFloat(0);
								 }
                              ?></span>
                         </dd>
                        </dl>
                   </div>


				 </div>

			<div class="vote-bl"><div class="vote-br"><div class="vote-bot"></div></div></div>









                      <?php endif;?>

                   <!-- <div class="back clearfix">
                      <?php if(($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached) && !$project['Project']['admin_suspend']):?>
                      <div class="back-details grid_5">
                        <div class="back-details-rgt">
                          <?php if($project['Project']['needed_amount'] >= $project['Project']['collected_amount'] || (Configure::read('Project.is_allow_over_funding') && $project['Project']['is_allow_over_funding'])): ?>
                          <?php if($this->Auth->user('id')) { ?>
                          <a href="<?php echo Router::url(array('controller' => 'project_funds', 'action' => 'add', $project['Project']['id']), true); ?>" class="fund-now-btn"><?php echo __l('Back this project'); ?><span class="small-block"><?php echo __l('or simply learn more'); ?></span></a>
                          <?php } else { ?>
                          <a href="<?php echo Router::url(array('controller' => 'users', 'action' => 'login', '?' => 'f=project/' . $project['Project']['slug'], 'admin' => false), true); ?>" class="fund-now-btn"><?php echo __l('Back this project'); ?><span class="small-block"><?php echo __l('or simply learn more'); ?></span></a>
                          <?php } ?>
                          <?php elseif($project['Project']['project_status_id'] == ConstProjectStatus::FundingClosed): ?>
                          <p><?php echo __l('Funding Successful');?></p>
                          <?php endif; ?>
                        </div>
                      </div>
                      <?php endif;?>
                    </div>-->
<?php if((Configure::read('Project.is_enable_idea') && $project['Project']['project_status_id'] == ConstProjectStatus::OpenForIdea ) || ($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached) && !$project['Project']['admin_suspend']){?>
                    <div class="like-block">
                          <div class="l-curve-top">
                            <div class="r-curve-top">
                              <div class="top-bg"></div>
                            </div>
                          </div>
                          <div class="shad-bg-lft clearfix">
                            <div class="shad-bg-rgt">
                              <div class="shad-bg <?php echo ($project['Project']['project_status_id'] == ConstProjectStatus::OpenForIdea) ? 'vote-count-block' : '';?>">

                                <h3><?php echo __l('Like this Project?'); ?></h3>
                                <?php if((Configure::read('Project.is_enable_idea') && $project['Project']['project_status_id'] == ConstProjectStatus::OpenForIdea )) {
                                ?>
                                <p class="place"><?php echo __l('Do you like this Project? Vote this project first before deciding to pledge in it.'); ?></p>
                                <?php
                                }
                                else { ?>
                                <p class="place"><?php echo __l('Do you like this Project? Pledge now or follow this project first before deciding to pledge in it.'); ?></p>
                                <?php } ?>

                                <?php  if (Configure::read('Project.is_project_follower_enabled')): ?>
                                <div class="follow-pledge follow-pledge2 clearfix">
                                  <p class="follow grid_left">
                                   <?php if ($this->Auth->sessionValid()): ?>
                                   <?php if($project['Project']['user_id'] != $this->Auth->user('id')): ?>
                                     <span class="js-followers-response">
                                     <?php
									  if (!empty($follower)):
										echo $this->Html->link(__l('Unfollow'), array('controller' => 'project_followers', 'action' => 'delete', $follower['ProjectFollower']['id']),array('class'=>"remove_follower js-add-remove-followers",'title'=>__l('Unfollow')));
									  else:
									     if($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached || $project['Project']['project_status_id'] == ConstProjectStatus::FundingClosed):
										     echo $this->Html->link(__l('Follow'), array('controller' => 'project_followers', 'action' => 'add', $project['Project']['id']),array('class' => "js-add-remove-followers", 'title'=>__l('Follow')));
                                         endif;
									  endif;
								    ?>
                                    </span>
                                 <?php endif; ?>
                               <?php else: ?>
                            <span>
                             <?php
								if ($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached || $project['Project']['project_status_id'] == ConstProjectStatus::FundingClosed):
									echo $this->Html->link(__l('Follow'), array('controller' => 'users', 'action' => 'login', '?' => 'f=project/' . $project['Project']['slug'], 'admin' => false), array('class' => '', 'title' => __l('Follow')));
								endif;
							 ?>
                           </span>
                             <?php endif; ?>
                            </p>
							<?php if(($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached) && !$project['Project']['admin_suspend']):?>
                                <p class="follow grid_left">
								<?php echo $this->Html->link(__l($link), array('controller' => 'project_funds', 'action' => 'add', $project['Project']['id']), array('title' => $link,'escape' => false)); ?>
                                  </p>
								  <?php endif; ?>

<?php
									if((Configure::read('Project.is_enable_idea') && $project['Project']['project_status_id'] == ConstProjectStatus::OpenForIdea )||(!Configure::read('Project.is_enable_idea') && ($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached))) {
										/*$rated_class = '';
										if($this->Auth->sessionValid() && !empty($project['ProjectRating']) && $project['ProjectRating'][0]['user_id'] == $this->Auth->user('id')):
											$rated_class = 'voted';
										endif;
										if($this->Auth->sessionValid() && $project['Project']['user_id'] == $this->Auth->user('id')):
											$rated_class = 'voted';
										endif;*/
								?>

<?php if(Configure::read('Project.is_enable_idea')) {?>
                      <div class="clearfix view-page-vote">
                        <p class="follow ">
                         <?PHP if((!$project_rating_count) && ($project['Project']['user_id'] != $this->Auth->user('id'))) {?>
                          <span class=" js-rating { 'container': 'js-idea-vote-display-<?php echo $project['Project']['id'];?>'}">
                            <?php if($this->Auth->sessionValid()) { ?>
                            <a class="js-vote-link"><?php echo __l('Vote'); ?>
                            </a>
                            <?php } else {?>
                            <?php echo $this->Html->link(__l('Vote'), array('controller' => 'users', 'action' => 'login'), array('escape' => false, 'title' => __l('Vote'))); ?>

                          <?php } ?>
                          	<?php if($this->Auth->sessionValid() && $project['Project']['user_id'] != $this->Auth->user('id') && empty($project['ProjectRating'])): ?>

                          <?php endif; ?>
                          </span>
                      <?PHP } elseif($project['Project']['user_id'] == $this->Auth->user('id')) { ?>
                     
                      <?PHP } else{ ?>
					  
                       <span class=" rating { 'container': 'js-idea-vote-display-<?php echo $project['Project']['id'];?>'}">

                            <a class="js-vote-link"><?php echo __l('Already voted'); ?>
                            </a>

                          </span>
                      <?PHP } ?>
                         </p>
						 	</div>

                          <?php } ?>
                           <?php if (Configure::read('Project.is_enable_idea') && (!$project_rating_count) && ($project['Project']['user_id'] != $this->Auth->user('id'))): ?>
						     <span class="hide js-idea-rating-display js-idea-vote-display-<?php echo $project['Project']['id']; ?> star-rating-view  js-rating-display {'count':'js-idea-vote-count-<?php echo $project['Project']['id']; ?>'}">
                              <?php
														$first_average_rating = 0;
														echo $this->element('_star-rating', array('project_id' => $project['Project']['id'], 'current_rating' => $first_average_rating ,'total_rating' => $project['Project']['total_ratings'],'rating_count' => $project['Project']['project_rating_count'], 'canRate' => ($this->Auth->sessionValid() && $project['Project']['user_id'] != $this->Auth->user('id')) ? 1 : 1));
													?>
                            </span>
                            <?php endif; ?>

<?php } ?>


                                </div>
                                <?php endif; ?>


                              </div>
                            </div>
                          </div>
                          <div class="l-curve-bot">
                            <div class="r-curve-bot">
                              <div class="bot-bg"></div>
                            </div>
                          </div>
                        </div>
<?php } ?>
                    <div class="pledge">
                      <ol class="pledge-list list clearfix">
                        <?php
							$more= ($project['Project']['pledge_type_id']!=ConstPledgeTypes::Fixed && $project['Project']['pledge_type_id']!=ConstPledgeTypes::Reward) ? __l('or more') : '';
							if (($project['Project']['project_status_id'] == ConstProjectStatus::OpenForFunding || $project['Project']['project_status_id'] == ConstProjectStatus::ReserveAmountReached || $project['Project']['project_status_id'] == ConstProjectStatus::GoalReached) && !$project['Project']['admin_suspend']):
								foreach ($project['ProjectReward'] as $projectReward):
						?>
                        <?php if ($projectReward['pledge_amount'] > ($project['Project']['needed_amount'] - $project['Project']['collected_amount']) && !($project['Project']['is_allow_over_funding'])): ?>
                        <li>
                          <div class="pledge-block">
                            <div class="pledge-block-inner">
                              <div class="reward-head">
                                <h3><?php echo __l('PLEDGE').' '.Configure::read('site.currency').$this->Html->cCurrency($projectReward['pledge_amount']);?></h3>
                                <p class="sold-out"><?php echo __l('Sold out').' '.$this->Html->cInt($projectReward['pledge_max_user_limit'] - $projectReward['project_fund_count']).' '.__l('of').' '.$projectReward['pledge_max_user_limit'].' '.__l('remaining');?></p>
                              </div>

                                <span class="rewarded"><?php echo $this->Html->cText($projectReward['reward']);?></span>
                                <span class="backers-block">
                                 <span class="backers-icon"><?php echo $this->Html->cInt($projectReward['project_fund_count']); ?></span>
                                  <span class="bold backers-block-inner"> <?php echo __l('BACKERS');?></span></span>

                            </div>
                          </div>
                        </li>
                        <?php elseif ($projectReward['pledge_max_user_limit'] == 0) :?>
                        <li>
                          <div class="pledge-block">
                            <div class="pledge-block-inner"> <a href="<?php echo Router::url(array('controller' => 'project_funds', 'action' => 'add', $project['Project']['id'], 'project_reward_id' => $projectReward['id']),true); ?>" title=" <?php echo __l('PLEDGE'); ?>"  class="pledge-inner-link"> <span class="reward-head"><?php echo __l('PLEDGE').' ' . Configure::read('site.currency') . $this->Html->cCurrency($projectReward['pledge_amount']) . ' ' . $more;?></span>

            <span class="rewarded"><?php echo $this->Html->cText($projectReward['reward']);?></span>

            <span class="backers-block"><span class="backers-icon"><?php echo $this->Html->cInt($projectReward['project_fund_count']); ?> </span>
            <span class="bold backers-block-inner"> <?php echo __l('BACKERS');?></span>
            </span>  </a>
            </div>    </div>
                        </li>
                        <?php else: ?>
                        <?php if ($projectReward['pledge_max_user_limit'] > $projectReward['project_fund_count']): ?>
                        <li>
                          <div class="pledge-block">
                            <div class="pledge-block-inner"> <a href="<?php echo Router::url(array('controller' => 'project_funds', 'action' => 'add', $project['Project']['id'], 'project_reward_id' => $projectReward['id']),true); ?>" title=" <?php echo __l('PLEDGE'); ?>" class="pledge-inner-block"> <span class="reward-head"><?php echo __l('PLEDGE') . ' ' . Configure::read('site.currency') . $this->Html->cCurrency($projectReward['pledge_amount']) . ' ' . $more;?></span> <span class="pledge-remaining"><?php echo __l('Limited reward') . ' ' . $this->Html->cInt($projectReward['pledge_max_user_limit'] - $projectReward['project_fund_count']) . ' ' . __l('of') . ' ' . $projectReward['pledge_max_user_limit'] . ' ' . __l('remaining');?></span>


         <span class="rewarded"><?php echo $this->Html->cText($projectReward['reward']);?></span> <span class="backers-block">
         <span class="backers-icon"><?php echo $this->Html->cInt($projectReward['project_fund_count']); ?> </span> <span class="bold backers-block-inner"> <?php echo __l('BACKERS');?></span> </span>  </a> </div>
                          </div>
                        </li>
                        <?php else: ?>
                        <li>
                          <div class="pledge-block">
                            <div class="pledge-block-inner">
                              <div class="reward-head">
                                <h3><?php echo __l('PLEDGE').' '.Configure::read('site.currency').$this->Html->cCurrency($projectReward['pledge_amount']).' '.$more;?></h3>
                                <p class="sold-out"><?php echo __l('Sold out').' '.$this->Html->cInt($projectReward['pledge_max_user_limit'] - $projectReward['project_fund_count']).' '.__l('of').' '.$projectReward['pledge_max_user_limit'].' '.__l('remaining');?></p>
                              </div>

                                <span class="rewarded"><?php echo $this->Html->cText($projectReward['reward']);?></span>
                                <span class="backers-block">
                                  <span class="backers-icon"><?php echo $this->Html->cInt($projectReward['project_fund_count']); ?> </span>
                                  <span class="bold  backers-block-inner"> <?php echo __l('BACKERS');?></span>
                                </span>

                            </div>
                          </div>
                        </li>
                        <?php endif; ?>
                        <?php endif; ?>
                        <?php endforeach; ?>
                        <?php elseif($project['Project']['project_status_id'] == ConstProjectStatus::FundingClosed or $project['Project']['project_status_id'] == ConstProjectStatus::FundingExpired or $project['Project']['project_status_id'] == ConstProjectStatus::ProjectCancelled or $project['Project']['project_status_id'] == ConstProjectStatus::Pending or $project['Project']['admin_suspend']): ?>
                        <?php foreach ($project['ProjectReward'] as $projectReward): ?>
                        <li>
                          <div class="pledge-block">
                            <div class="pledge-block-inner">
                              <div class="reward-head">
                                <h3><?php echo __l('PLEDGE').' '.Configure::read('site.currency').$this->Html->cCurrency($projectReward['pledge_amount']).' '.$more;?></h3>
                              </div>

                                <span class="rewarded"><?php echo $this->Html->cText($projectReward['reward']);?></span>
                                <span class="backers-block">
                                  <span class="backers-icon"><?php echo $this->Html->cInt($projectReward['project_fund_count']);?></span>
                                  <span class="bold  backers-block-inner"><?php echo __l('BACKERS');?></span>
                                </span>

                            </div>
                          </div>
                        </li>
                        <?php endforeach; ?>
                        <?php endif; ?>
                      </ol>
                    </div>
                    <div class="developer-info developer-info1">
                      <h4><?php echo __l('Project by'); ?></h4>

                      <?php if(!empty($project['User']['id'])): ?>
                      <div class="clearfix usrinfo-block">
                        <div class="info-left grid_2 alpha"> <?php echo $this->Html->getUserAvatar($project['User']['id'], 'normal_thumb'); ?> </div>
                        <div class="info-right grid_left">
						<div class="clearfix">
						<div class="grid_left">
							  <?php
											$userLocation = array();
											if (!empty($project['User']['UserProfile']['City'])) :
												$userLocation[] = $project['User']['UserProfile']['City']['name'];
											endif;
											if (!empty($project['User']['UserProfile']['Country'])) :
												$userLocation[] = $project['User']['UserProfile']['Country']['name'];
											endif;
											$userplace = implode(', ', $userLocation);
											if ($userplace) :
										?>
                          <address>
                          <?php if(!empty($project['User']['UserProfile']['Country']['iso2'])): ?>
                          <span class="flags flag-<?php echo strtolower($project['User']['UserProfile']['Country']['iso2']); ?>" title ="<?php echo $project['User']['UserProfile']['Country']['name']; ?>"><?php echo $project['User']['UserProfile']['Country']['name']; ?></span>
						  <span class="address-hide"><?php echo ' ' . $userplace; ?></span>
                          <?php endif; ?>
                          </address>
                          <?php
											endif;
										?>
							
						</div>
						  <h5 class="grid_left"><?php echo $this->Html->link($this->Html->cText($project['User']['username']), array('controller' => 'users', 'action' => 'view',  $project['User']['username'], 'admin' => false), array('escape' => false, 'title'=>$project['User']['username'])); ?></h5>
						</div>
	  						<div class="user-details">
                                  <p><span><?php echo $project['User']['project_count'];?></span><?php echo __l(' Project(s)'); ?></p>
								  <p><span><?php echo $project['User']['project_fund_count'];?></span><?php echo __l(' Backed project(s)'); ?></p>
                                  <p><?php echo __('Following ');?> <span><?php echo $project['User']['project_follower_count'];?></span> <?php echo __l(' project(s)'); ?></p>
							</div>


                        </div>
                        <div class="info-left grid_right">        
                                 <?php if ($project['User']['id'] !=  $this->Auth->user('id')): ?>  <p>                             <?php
												if($this->Auth->user('id')):
													echo $this->Html->link(__l('Send message'), array('controller' => 'messages', 'action' => 'compose', 'user' => $project['User']['username'],'project_id'=>$project['Project']['id']), array('class' => 'js-colorbox cboxelement msg msg1', 'escape' => false,'title'=>__l('send message')));
												else:
													echo $this->Html->link(__l('Send message'), array('controller' => 'users', 'action' => 'login/?f='.$this->request->url), array('escape' => false, 'class' => 'msg msg1','title'=>__l('send message')));
												endif;
											?> </p><?php endif; ?>
                              
						  <p class="paypal-verification grid_right">
                            <?php
								if(Configure::read('user.is_show_payapl_seal') && !empty($project['User']['UserProfile']['paypal_account']) ):
									echo $this->Html->link($this->Html->image('http://images.paypal.com/images/verification_seal.gif'), 'https://cms.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=security/verification_faq', array('title' => __l('This item is offered by a verified PayPal user'), 'target' => '_blank', 'escape' => false));
								endif;
							?>
                          </p>
							</div>
                      </div>
                      <?php else: ?>
                      <?php echo __l('User Deleted'); ?>
                      <?php endif;?>
                    </div>
                    <?php if (Configure::read('Project.is_enable_idea')): ?>
                    <?php echo $this->element('votes', array('project_id' => $project['Project']['id'])); ?>
                    <?php endif;?>
                    <?php if($project['Project']['project_status_id'] != ConstProjectStatus::OpenForIdea):?>
                    <?php echo $this->element('backers', array('project_id' => $project['Project']['id'])); ?>
                    <?php endif;?>
                    <?php echo $this->element('followers', array('project_id' => $project['Project']['id'])); ?>
                    <?php echo $this->element('project-activities', array('type'=>'project','id'=>$project['Project']['id'], 'config' => 'sec'));?>
                  </div>
                </div>
              </div>
              <div class="side2-bot-lft">
                <div class="side2-bot-rgt">
                  <div class="side2-bot"></div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <?php if($this->Auth->user('user_type_id') == ConstUserTypes::Admin): ?>
        <div class="admin-tabs-block">
          <div class="js-tabs">
            <ul>
              <?php if (Configure::read('Project.is_project_comment_enabled') && !Configure::read('Project.is_fb_project_comment_enabled')): ?>
              <li><em></em><?php echo $this->Html->link(__l('Project Comments'), array('controller' => 'project_comments', 'action' => 'index', 'project_id' => $project['Project']['id'], 'view_type' => 'user_view', 'admin' => true), array('escape' => false)); ?></li>
              <?php endif; ?>
              <li><em></em><?php echo $this->Html->link(__l('Project Views'), array('controller' => 'project_views', 'action' => 'index', 'project_id' => $project['Project']['id'], 'view_type' => 'user_view', 'admin' => true), array('escape' => false)); ?></li>
              <?php if (Configure::read('Project.is_enable_idea') && $backer) :?>
              <li><em></em><?php echo $this->Html->link(__l('Project Ratings'), array('controller' => 'project_ratings', 'action' => 'index', 'project_id' => $project['Project']['id'], 'view_type' => 'user_view', 'admin' => true), array('escape' => false)); ?></li>
              <?php endif; ?>
              <li><em></em><?php echo $this->Html->link(__l('Project Funding'), array('controller' => 'project_funds', 'action' => 'index', 'project_id' => $project['Project']['id'], 'view_type' => 'user_view', 'admin' => true), array('escape' => false)); ?></li>
              <?php if (Configure::read('Project.is_project_flag_enabled')) :?>
              <li><em></em><?php echo $this->Html->link(__l('Project flags'), array('controller' => 'project_flags', 'action' => 'index', 'project_id' => $project['Project']['id'], 'view_type' => 'user_view', 'admin' => true), array('escape' => false)); ?></li>
              <?php endif; ?>
            </ul>
          </div>
        </div>
        <?php endif; ?>
        <div id="fb-root"></div>
        <script type="text/javascript">
			window.fbAsyncInit = function() {
				FB.init({appId: '<?php echo Configure::read('facebook.app_id');?>', status: true, cookie: true, xfbml: true});
			};
			(function() {
				var e = document.createElement('script'); e.async = true;
				e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
				document.getElementById('fb-root').appendChild(e);
			}());
		</script>
      </div>
    </div>
  </div>
  <div class="l-curve-bot">
    <div class="r-curve-bot">
      <div class="bot-bg"></div>
    </div>
  </div>
</div>